export default {
    namespaced: true,
    state: {
        arr: [
            {
                id: 1,
                name: "张三",
                gender: "男",
                prov: "四川省"
            },
            {
                id: 2,
                name: "李四",
                gender: "女",
                prov: "北京市"
            },
            {
                id: 3,
                name: "王五",
                gender: "保密",
                prov: "广州市"
            }
        ]
    },
    mutations: {
        addPersonInfo(state,payload){
            state.arr.push(payload)
            console.log(state.arr);
        },
        delPersonInfo(state,payload){
            state.arr = state.arr.filter((item)=>{
                return item.id != payload
            })
        }
    }
}